/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.volatileengine.material.shader.variable;

import com.volatileengine.resources.references.Handle;
import com.volatileengine.resources.references.Resource;

/**
 * 
 * @author Administrator
 */
public abstract class ShaderVariable<T> implements Cloneable, Resource {

	protected String name;
	protected T value;

	private Handle<?> handle;

	public ShaderVariable(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public T getValue() {
		return value;
	}

	public void setValue(T value) {
		this.value = value;
	}

	@Override
	public Handle<?> getHandle() {
		return handle;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#clone()
	 */
	@Override
	protected Object clone() throws CloneNotSupportedException {
		// TODO Auto-generated method stub
		return super.clone();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		return value.hashCode();
	}

}
